1. Field of the Invention
The invention relates to a printer for printing on the basis of data from a host computer and, more particularly, to a printer for performing a hand-shake reception from a host computer.
2. Related Background Art
Hitherto, a printer for hand-shake receiving data from a host computer by hardware has: a memory (receiving buffer) for storing reception data; data holding means for transferring the reception data to the receiving buffer; data reading means for sequentially extracting the reception data from the receiving buffer; vacant capacity counter means for calculating a vacant capacity of the receiving buffer from a difference between the number of reception data held and the number of reception data read out; means for generating a /ACKNLG pulse as a response signal for performing the hand-shake reception by hardware and a BUSY signal; BUSY resetting means which is made operative by the /ACKNLG pulse; comparing means for comparing the vacant capacity value obtained by the vacant capacity counter means with a predetermined value; and BUSY extension means which is made operative by an output signal from the comparing means and extends a data reception BUSY period of time, wherein the vacant capacity value by the vacant capacity counter means and the predetermined value are compared by the comparing means and, when the vacant capacity value is below the predetermined value, a BUSY period of time at the time of the next data reception is extended by a predetermined time by the BUSY extension means.
According to the conventional apparatus as mentioned above, when the vacant capacity of the receiving buffer decreases, the BUSY period of time is extended and a data receiving pace is made slow, thereby adjusting a balance between the data receiving pace and a data reading pace and avoiding a situation such that the receiving buffer is filled with the data and the BUSY status continues for a long time and a device time-out process of the host computer operates.
Since the above conventional apparatus, however, has a construction such that the BUSY period of time is extended by the predetermined time, when the reception data reading pace for the BUSY extension period of time is fast, even if all of the reception data held in the receiving buffer is fully read out, the BUSY status is not released until the end of the extension time and a vain time in which none of the data reception and the reading operation of the reception data is performed occurs, so that there is a case where a throughput remarkably deteriorates.
As a countermeasure of such a problem, a method of examining the optimum value of the BUSY extension time and setting is considered. However, the data receiving pace largely changes in dependence on a performance and a data amount per line of a host computer, particularly, a printer driver built therein, that is, a difference between image data and text data or a difference between monochromatic data and color data, or the like, so that it is difficult to find out the optimum value.
To prevent such a drawback, therefore, a construction such that a proper time is enabled to be selected from a plurality of BUSY extension times and they can be switched in accordance with the type of host computer or data is also considered. However, means for discriminating the type of host computer or data has to be established and added. A problem such as large labor, increase in costs, or the like newly occurs.
On the other hand, the receiving data reading pace largely changes in dependence on printing conditions of the printer, data amount per line, or the like. Further, the capacity of the receiving buffer differs in dependence on the kind of printer, emulation mode, or the like. It is, therefore, difficult to find out the optimum BUSY extension period of time in which the vain time as mentioned above doesn't occur in the BUSY extension period of time.